﻿<ResourceDictionary
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:Dialogs="clr-namespace:MContracts.Controls.Dialogs">
    <Style TargetType="{x:Type Dialogs:DialogShell}" BasedOn="{StaticResource {x:Type Window}}">
        <Setter Property="Template">
            <Setter.Value>
            <ControlTemplate TargetType="{x:Type Dialogs:DialogShell}" >
<AdornerDecorator>

                    <Grid Background="{TemplateBinding Background}">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <ContentPresenter
                 ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                 Content="{TemplateBinding ContentControl.Content}" />
                        <StackPanel x:Name ="FooterPanel" Grid.Row="1" Orientation="Horizontal" Margin="5" HorizontalAlignment="Right">

                            <Button x:Name="PART_OKButton" Width="100" Content="OK" Command="{TemplateBinding OkCommand}"/>
                            <Button x:Name="PART_CancelButton" Margin="10,0,10,0" Width="100" Content="Отмена"  Command="{TemplateBinding CancelCommand}"/>
                            <Button x:Name="PART_ApplyButton" Margin="10,0,10,0"  Width="100" Content="Применить" Command="{TemplateBinding ApplyCommand}"/>
                        </StackPanel>
                    </Grid>
</AdornerDecorator >

                
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>